var purchaseGoodsVm = new Vue({
    el: '#purchaseGoodsApp',
    data: {
        goods: [],
        loading: true,
    },
    mounted: function () {
        this.queryGoodsList();
    },
    methods: {
        queryGoodsList: function () {
            var self = this;
            $.get(baseURL + "mall/purchaseGoods/queryGoodsList", function(r){
                self.goods = r.goods;
                self.loading = false;
            });
        },
        goodsClick: function (idx) {
            var item = this.goods[idx];
            window.open("/jumpMallGoodsPage?goodsId="+ item.goodsId +"&goodsType=" + item.goodsType);
        },
    }
});